package org.example.controller.bonus;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.example.common.JsonResult;
import org.example.controller.rep.BankRatePageRep;
import org.example.controller.rep.BonusListRep;
import org.example.controller.req.BankRateReq;
import org.example.service.bank.BankRateService;
import org.example.service.bonus.BonusService;
import org.example.service.utils.IConst;
import org.example.service.utils.PageUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

import static org.example.service.utils.IConst.API_BASE;

/**
 * @Author tql
 * @Desc 福利领取 控制器
 * @Date 2024/2/26 14:36
 * @Version 1.0
 */
@Slf4j
@RestController
@RequestMapping(API_BASE + "bonus")
@Api(tags = IConst.MODULE_BONUS)
public class BonusController {

    @Resource
    private BonusService bonusService;

    @GetMapping("/list")
    @ApiOperation(value = "福利领取列表", tags = IConst.MODULE_BONUS)
    public JsonResult<List<BonusListRep>> list() {
        List<BonusListRep> lists = bonusService.lists();
        return JsonResult.ok(lists);
    }
}
